﻿<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:controls="clr-namespace:DeepZoomBookControl"
    xmlns:local="clr-namespace:DeepZoomBookControl">
 
    <local:PageListEffect PagingFactor="{Binding PagingFactor, ElementName=main}" x:Key="effect">
        <local:PageListEffect.PrevState>
            <ImageBrush x:Name="imgBrush"/>
        </local:PageListEffect.PrevState>
    </local:PageListEffect>

    <Style TargetType="local:DeepZoomBook">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:DeepZoomBook">
                    <Border Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            x:Name="main" x:FieldModifier="private"
                            >
                        <Border.Resources>
                            <controls:PageListEffect x:Name="effect"  x:Key="effect">
                                <controls:PageListEffect.PrevState>
                                    <ImageBrush x:Name="imgBrush"/>
                                </controls:PageListEffect.PrevState>
                            </controls:PageListEffect>
                        </Border.Resources>
                        <Grid>
                            <Canvas>
                                <Rectangle Fill="Black" Opacity="0.9" Width="0" Height="0" x:Name="shadow" RadiusX="3" RadiusY="3"/>
                            </Canvas>
                            <Border BorderThickness="0" BorderBrush="Black" x:Name="contentBorder" Background="#FFE5E5E5">
                                <MultiScaleImage UseLayoutRounding="False" Source="http://localhost:2125/ClientBin/book1/book1.xml" x:Name="multiScaleImage" x:FieldModifier="private">
                                </MultiScaleImage>
                            </Border>
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>
